<template>
  <div>
    性别:{{ sex=== 0?"男":"女"}}
    <button @click="btn">男女转换</button>
  </div>
</template>

<script>
export default {
  data () {
    return {
      sex:0,
    }
  },

  created () {

  },

  methods: {
    btn(){
      this.sex = this.sex === 0?1:0;
    }
  }
}
</script>

<style scoped lang='less'>

</style>

